/*
 Template Name: Xacton - Admin & Dashboard Template
 Author: Myra Studio
 File: Dashboard
*/

$(function() {
  'use strict';
  if ($('#morris-line-example').length) {
    Morris.Line({
      element: 'morris-line-example',
      gridLineColor: '#eef0f2',
      lineColors: ['#e83e8c', '#23b5e2'],
      data: [{
        y: '2013',
        x: 10
      },
      {
        y: '2014',
        x: 11
      },
      {
        y: '2015',
        x: 12
      },
      {
        y: '2016',
        x: 10
      },
      {
        y: '2017',
        x: 11
      },
      {
        y: '2018',
        x: 12
      },
      {
        y: '2019',
        x: 10
      }
      ],
      xkey: 'y',
      ykeys: 'x',
      hideHover: 'auto',
      resize: true,
      
    });
  }
  if ($('#morris-area-example').length) {
    Morris.Area({
      element: 'morris-area-example',
      lineColors: ['#1d84c6', '#f8ac5a'],
      data: [{
        y: '2013',
        x: 5.5
      },
      {
        y: '2014',
        x: 98.5
      },
      {
        y: '2015',
        x: 44.2
      },
      {
        y: '2016',
        x: 31.5
      },
      {
        y: '2017',
        x: 68.2
      },
      {
        y: '2018',
        x: 10.6
      },
      {
        y: '2019',
        x: 20.9
      }
      ],
      xkey: 'y',
      ykeys: 'x',
      hideHover: 'auto',
      gridLineColor: '#eef0f2',
      units: '%',
      resize: true,
    });
  }
  
  if ($('#morris-area-example1').length) {
    Morris.Area({
      element: 'morris-area-example1',
      lineColors: [ '#f8ac5a'],
      data: [{
        y: '2013',
        x: 0
      },
      {
        y: '2014',
        x: 985
      },
      {
        y: '2015',
        x: 369
      },
      {
        y: '2016',
        x: 483
      },
      {
        y: '2017',
        x: 0
      },
      {
        y: '2018',
        x: 865
      },
      {
        y: '2019',
        x: 10
      }
      ],
      xkey: 'y',
      ykeys: 'x',
      hideHover: 'auto',
      gridLineColor: '#eef0f2',
      units: 'MB',
      resize: true,
    });
  }

  if ($('#morris-area-example2').length) {
    Morris.Area({
      element: 'morris-area-example2',
      lineColors: [ '#f8ac5a'],
      data: [{
        y: '2013',
        x: 405
      },
      {
        y: '2014',
        x: 985
      },
      {
        y: '2015',
        x: 442
      },
      {
        y: '2016',
        x: 315
      },
      {
        y: '2017',
        x: 682
      },
      {
        y: '2018',
        x: 106
      },
      {
        y: '2019',
        x: 209
      }
      ],
      xkey: 'y',
      ykeys: 'x',
      hideHover: 'auto',
      gridLineColor: '#eef0f2',
      units: 'MB',
      resize: true,
    });
  }



});